export const TOAST = {
  anchor: ['','随机打开页面id，逗号分隔',{"pages":[2,3,4],"relateCompId":""}],
  layer: ['','获取表单数据动态替换弹层中的动态文本和图片，组件id用，分隔',{"allRange":[0,5],"range":['1,5','0'],"popId":[3,4]},{"pops":[2,3],"relateCompId":""}],
  submit: [{"successText":"提交成功！","failText":"提交失败！"},'多选关联id',{"groupCompId":"组件id"}],
  smsVerification: [{"smsVerification":"验证码已发送！","failText":"失败了！"}],
  vote: [{"successText":"投票成功了！","failText":"投票失败了！"}],
  number: [{"successText":"计数成功了！","failText":"计数失败了！"},'',{"relateCompId":"compId"}],
  push: [{"successText":"已发布助力了！","failText":"发布助力！"}],
  repost: [{"successText":"转发成功了！","failText":"转发失败了！"}],
  praise: [{"successText":"点赞成功了！","failText":"点赞失败了！"}],
  follow: [{"successText":"关注成功了！","failText":"关注失败了！"}],
  lottery: [{"code":"","default":"","successText":"抽奖成功了！","failText":"抽奖失败了！","notEnough":""}],
  packet: [{"successText":"红包领取成功了！","failText":"红包领取失败了！"}],
  msg: [{"successText":"发送私信成功！","failText":"发送私信失败了！"}],
  compareInComps: [{"compId":"组件id","compareCompId":"组件id","hint":"自定义不满足条件提示"}],
  saveImg: ['给关联发博$id$设置数据','截图组件$id$','需要被替换图片组件$id$','$id$,$id$'],
  rotate3d: ['','','',{"delayTime": 1}],
  showOrHide:[{"displayCompId":"组件id","hiddenCompId":"组件id","time":"时间格式"}],
  interactionData: [{"card":{1:1,2:2,3:3,4:4,5:5},"time":"2021/03/25"}],
  frontEvents: ['', {"randomArr":[2,3],"notSameArr":[3,6],"randomCount":3,"lastPageId":7,"lastPopId":1,"time":1,"imgRelateCompIds":"","bgIndexs":[],"bgRelateCompId":""}],
  animate: [{"relateCompId":"id"}]
}

export const PAPER_TYPES = [
  { name: "随机绘制", value: 0 },
  { name: "绘制颜色块", value: 1 },
]
export const PAPER_TYPE_MAP = {
  freedomDraw: 0,
  drawColors: 1,
}

export const PLACEHOLDER = {
  offsetGood: '{"compId":{"yPercent":""}}'
}

export const CONTROL_TYPES = {
  vote: '1001',
  number: '1002',
  wb_repost: '1003',
  wb_push: '1004',
  wb_msg: '1005',
  wb_praise: '1006',
  wb_follow: '1007',
  wb_is_follow: 'isFollow',
  wb_packet: '1008',
  wb_lottery: '1009',
  wb_reposts: '1010',
  wb_rank_friend: '1011',
  wb_judge_right_wrong: '1012',
  wb_user: '1013',
  wb_activity_info: '1014',
  wb_general: '1015',
  wb_general_num: '1016',
  report_pasture_plan: '1017',
  number_dayexists: '1018',
  submit: 'submit',
  smsVerification: 'smsVerification',
  timer: 'timer',
  site: 'site',
  customUser: 'customUser',
}

export const WB_LISTS_CONTROL_ID = [
  CONTROL_TYPES.wb_reposts,
  CONTROL_TYPES.wb_rank_friend,
  CONTROL_TYPES.wb_judge_right_wrong,
  CONTROL_TYPES.wb_user,
]
export const CONTROL_WB_ATTR = {
  '1003': {controlId: '1003', wbAttr: {isRandom: false}},
  '1004': {controlId: '1004', wbAttr: {isRandom: false}},
}

export const COMPONENT_TYPES = {
  wb_text: 1,
  wb_img: 2,
  wb_audio: 3,
  wb_video: 4,

  wb_videos: 10,
  wb_imgs: 11,

  wb_timer: 14,

  wb_menu: 18,

  wb_camera: 20,
  wb_turn_book: 21,
  wb_scroll_container: 22,
  wb_moveable: 23,
  wb_calendar: 24,
  wb_grasp_doll: 25,

  wb_head: 52,
  
  wb_carousel: 63,
  wb_common_list: 64,
  wb_is_post_event: 65,
  wb_table: 69,
  wb_slot_machine: 70,

  wb_input: 100,
  wb_btn: 101,
  contacts: 102,
  wb_form_score: 103,
  wb_radio: 104,
  wb_checkbox: 105,
  wb_dropdown: 106,
  wb_form: 107,
  wb_address: 108,
  wb_switch: 117,
  wb_upload: 116,

  wb_process: 110,
  wb_flip_mc: 112,
  wb_notice_bar: 113,
  wb_icon: 114,
  wb_svg_icon: 115,
  wb_bg: 120,

  //createjs 300
  wb_bitmap_text: 304,
  wb_mc: 306,

  //paper
  wb_paper: 400,

  group_component: 500,
  group_carousel: 501,

  //phaser 1000
  wb_phasers: 1000,
  
  //pixi
  wb_pixis: 2004,

  //threejs
  wb_panorama: 5001,
  wb_threes: 5002,
}

export const INJECT_IN_GROUPS = [
  COMPONENT_TYPES.wb_img,
  COMPONENT_TYPES.wb_btn,
  COMPONENT_TYPES.wb_bg,
]

export const REFRESH_COMMON_ATTR = [
  COMPONENT_TYPES.wb_text,
  COMPONENT_TYPES.wb_img,
  COMPONENT_TYPES.wb_video,
  COMPONENT_TYPES.wb_timer,
  COMPONENT_TYPES.wb_mc,
  COMPONENT_TYPES.wb_svg_icon,
  COMPONENT_TYPES.wb_dropdown,
]

export const COMPARE_FORM = [
  COMPONENT_TYPES.wb_radio,
  COMPONENT_TYPES.wb_checkbox,
  COMPONENT_TYPES.wb_dropdown,
  COMPONENT_TYPES.wb_form,
  COMPONENT_TYPES.wb_address,
  COMPONENT_TYPES.group_component,
]
export const WB_ITEM_LISTS = [
  COMPONENT_TYPES.wb_menu,
  COMPONENT_TYPES.wb_carousel,
  COMPONENT_TYPES.wb_common_list,
  COMPONENT_TYPES.wb_radio,
  COMPONENT_TYPES.wb_checkbox,
  COMPONENT_TYPES.wb_head,
  COMPONENT_TYPES.wb_scroll_container,
]
export const EXCLUDE_CIDS = [COMPONENT_TYPES.wb_text, COMPONENT_TYPES.wb_audio, COMPONENT_TYPES.wb_videos,
  COMPONENT_TYPES.wb_video, COMPONENT_TYPES.wb_img, COMPONENT_TYPES.wb_imgs]
export const MAIL_DAIL_COMP_TYPES = [COMPONENT_TYPES.wb_text, COMPONENT_TYPES.wb_img, COMPONENT_TYPES.wb_btn]

export const DOM_CID = 1
export const CREATEJS_CID = 300
export const GROUP_COMPONENT = 500
export const PHASER_CID = 1000
export const PIXI_CID = 2000
export const THREE_CID = 5000
export const MAX_CID = 10000

export const HIDDEN_EVENT_TABS = [
  COMPONENT_TYPES.wb_input,
  COMPONENT_TYPES.wb_menu,
  COMPONENT_TYPES.wb_reposts,
  COMPONENT_TYPES.wb_radio,
  COMPONENT_TYPES.wb_checkbox,
  COMPONENT_TYPES.wb_dropdown,
]
